<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/10/10
 * Time: 16:47
 */

// 这个就是图库页
// TODO 这里要读取数据库显示内容
// 引入文件
include_once 'SqlDB.class.php';

// 连接数据库
$sqlDb = SqlDB::init('127.0.0.1', '3306', 'root', '', 'postcard');

// 写一个sql语句获取首页要展示的内容
$cardLabels = $sqlDb->getAll('select * from cards_label');
$cardAll = $sqlDb->getAll('select * from card');

$cardLabel_1 = $sqlDb->getAll('select id from cards_label where label_id=1');
$cardLabel_2 = $sqlDb->getAll('select id from cards_label where label_id=2');
$cardLabel_3 = $sqlDb->getAll('select id from cards_label where label_id=3');
$cardLabel_4 = $sqlDb->getAll('select id from cards_label where label_id=4');

include 'site/gallery.php';